﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace MedManager
{
    public partial class PasswordFrm : Form
    {
        public PasswordFrm()
        {
            InitializeComponent();
        }

        private void PasswordFrm_Load(object sender, EventArgs e)
        {
            this.Text = "修改密码";
        }

        private void btnSave_Click(object sender, EventArgs e)
        {
            if(!String.IsNullOrEmpty(txtPassword.Text))
            {
                Src.Func.user.password = txtPassword.Text.Trim();
                if(Src.Func.userinfoBll.Update(Src.Func.user))
                {
                    MessageBox.Show(this, "修改成功！");
                }else
                {
                    MessageBox.Show(this, "修改失败！");
                }
            }
        }
    }
}
